//加载整体页面
function loadBaseinfo(){
	loadLeft();
	loadRight();
	loadCenter();
/*	$.post('/tcmbdsp_c/RankingOfResourceDataController/getProvinceQuotaListByDoctorNmuDesc',{},function(data){
		pNames=data.data.list1;
		dNums=data.data.list2;
		alert(pNames.length);
		alert(dNums.length);

	})*/
}
function loadLeft(){
	left=document.getElementById('left');
	left.innerHTML='<div id="left_1" style="border-style: solid; border-width: 32px 37px; border-image-slice: 32 37 fill; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; background: none;border-image-source:url(\'/tcmbdsp_c/resources/image/kuang.png\');height: 305px">'
			+'</div>'
			+'<div style="height: 20px"></div>'
			+'<div id="left_2" style="border-style: solid; border-width: 32px 37px; border-image-slice: 32 37 fill; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; background: none;border-image-source:url(\'/tcmbdsp_c/resources/image/kuang.png\');height: 312px">'
			+'</div>'
			+'<div style="height: 20px"></div>'
			+'<div id="left_3" style="border-style: solid; border-width: 32px 37px; border-image-slice: 32 37 fill; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; background: none;border-image-source:url(\'/tcmbdsp_c/resources/image/kuang.png\');height: 305px">'
			+'</div>';
	loadLeft_1();
	loadLeft_2();
	loadLeft_3();
}
function loadCenter(){
	mid=document.getElementById('center');
	document.getElementById('center').innerHTML='<div id="center_1" style="height: 194.4px"></div><div id="center_2" style="height: 583.2px"></div><div style="height: 184.4px;width:862px"><div style="margin:0 auto;width: 862px;top:80px;position: relative;bottom:100px"><button name="bt" style="margin-right:20px" class="btn btn-info" onclick="beCheck(this)">中医馆基础信息</button><button name="bt" style="margin-right:20px" class="btn btn-info" onclick="beCheck(this)">中医馆健康信息平台项目实施进展</button><button name="bt" class="btn btn-info" onclick="beCheck(this)">平台使用情况</button></div></div>'
	loadCenter_1();
	loadCenter_2();
}
function loadRight(){
	right=document.getElementById('right');
	right.innerHTML='<div id="right_1" style="border-style: solid; border-width: 32px 37px; border-image-slice: 32 37 fill; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; background: none;border-image-source:url(\'/tcmbdsp_c/resources/image/kuang.png\');height: 305px"></div>'
				+'	<div style="height: 20px"></div>'
				+'	<div id="right_2" style="border-style: solid; border-width: 32px 37px; border-image-slice: 32 37 fill; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; background: none;border-image-source:url(\'/tcmbdsp_c/resources/image/kuang.png\');height: 312px">	</div>'
				+'	<div style="height: 20px"></div>'
				+'	<div id="right_3" style="border-style: solid; border-width: 32px 37px; border-image-slice: 32 37 fill; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; background: none;border-image-source:url(\'/tcmbdsp_c/resources/image/kuang.png\');height: 305px">	</div>';
	loadRight_1();
	loadRight_2();
	loadRight_3();
}

function loadLeft_1(){
	left_1=document.getElementById("left_1");
	document.getElementById("left_1").innerHTML='<h4 align="center" style="color:#EBD775">中医馆信息化实施</h4>';

	$.post('/tcmbdsp_c/Information/getComputerNum',{},function(data){
		computerTotal=data.data[0].value;
		computerAve=data.data[1].value;
		cameraTotal=data.data[2].value;
		cameraAve=data.data[3].value;
	//电脑
		img_cp=document.createElement('div');
		cp=document.createElement('div');
		cp.innerHTML='<div></div>';
		cp.setAttribute('id','cp' );
		cp.setAttribute('style', 'height:90%;width:30%;float: left;display: inline;');
		left_1.appendChild(cp);
		cp.innerHTML='<h5>电脑</h5>';
//		img_cp.innerHTML='<img src="/tcmbdsp_c/resources/images/computer.png" style="height:70px;width:72px;margin-bottom:5px">';
		img_cp.innerHTML='<img src="/tcmbdsp_c/resources/images/computer.png" height="72px" width="72px" margin-bottom="0px">';
		img_cp.setAttribute('style','position:relative;top:5%');
		cp.appendChild(img_cp);
		pcpt=document.createElement('div');
		pcpt.innerHTML='<p>共'+computerTotal+'台</p> <p>'+computerAve+'台/中医馆</p>';
		pcpt.setAttribute('style','position:relative;top:16%');
		cp.appendChild(pcpt);
	//摄像头
		img_cm=document.createElement('div');
		cm=document.createElement('div');
		cm.innerHTML='<div></div>';
		cm.setAttribute('id','cm' );
		cm.setAttribute('style', 'height:90%;width:30%;float: left;display: inline;');
		left_1.appendChild(cm);
		cm.innerHTML='<h5>摄像头</h5>';
		img_cm.setAttribute('style','position:relative;top:0%;padding-top:0px');
		img_cm.innerHTML='<img src="/tcmbdsp_c/resources/images/camera.png" style="height:89px;width:89px;">';
		cm.appendChild(img_cm);
		pcmt=document.createElement('div');
		pcmt.innerHTML='<p>共'+cameraTotal+'台</p> <p>'+cameraAve+'台/中医馆</p>';
		pcmt.setAttribute('style','position:relative;top:8%');
		cm.appendChild(pcmt);
	});

	$.post('/tcmbdsp_c/Information/NetTCMWorkStation',{},function(data){
//net
		net=document.createElement('div');
		net.innerHTML='<div></div>';
		net.setAttribute('id','net' );
		net.setAttribute('style', 'height:90%;width:30%;float: left;display: inline;position:absolute;left:60%;');
		left_1.appendChild(net);
		net.innerHTML='<h5>网络</h5>';
		myecahrt1=echarts.init(net);
		var hasNet=parseInt(data.data.list2[0].value),
			noNet=parseInt(data.data.list2[1].value),
			netHas=data.data.list1[0].value,
			netNo=data.data.list1[1].value;
		var option1 = {
	      backgroundColor: 'none',
	      title: {
	          text: '网络',
	          left: 'center',
	          top: 10,
	          textStyle: {
	              color: '#ccc'
	          }
	      },
	      tooltip : {
	          trigger: 'item',
	          formatter: "{a} <br/>{b} : {d}%"
	      },
/*	      visualMap: {
	          show: false,
	          min: 500,
	          max: 600,
	          inRange: {
	              colorLightness: [0, 1]
	          }
	      },*/
	      legend: {
		        orient: 'vertical',
		        left: 'left',
		        data: [netHas+':'+hasNet,
		               netNo+':'+noNet]
		    },
	      series : [
	          {
	              name:'网络',
	              type:'pie',
	              clockwise:'true',//是否顺时针旋转
	              startAngle:'30',//起始的倾斜角度
	              radius : '60%',//半径
	              center: ['50%', '13%'],//水平，竖直
	              data:[
	                  {
	                      value:hasNet,
	                      name:'有\n网\n络',
	                      itemStyle:{
	                          normal:{
	                              color:'rgb(77,211,223)'
	                          }
	                      }
	                  },
	                  {
	                      value:noNet,
	                      name:'无\n网\n络',
	                      itemStyle:{
	                          normal:{
	                              color:'rgb(240,240,240)'
	                          }
	                      }
	                  }

	              ],
	          }
	      ]
	  };
		myecahrt1.setOption(option1);
/*		var data = data.data,options2,docItem1,docItem2;
	    docItem1 = replace(data.list3);
	    docItem2 = replace(data.list4);
		options2 = {
			legendData : data.list1,
			yData : data.list2,
			stack:'总量',
			maleData: docItem1,
			femaleData: docItem2,
			chartWrapperId: 'c2'	
		};
	chart.PNStackBar(options2);	*/
	});
}
function drawRing(div,title,key1,key2,value1,value2){
	var myecahrt=echarts.init(div);
	var option = {
			
		    tooltip: {
		        trigger: 'item',
		        formatter: "{a} <br/>{b} : {c} ({d}%)"
		    },
		    grid:{
		    	y:'-10%'
		    },
		    title: {
		          text: title,
		          left: 'center',
		          top: 26,
		          textStyle: {
		              color: '#ccc',
		              fontSize: 17//标题字大小
		          }
		      },
/*		    legend: {
		        orient: 'vertical',
		        left: 'left',
		        data: ['占有率']
		    },*/
		    series: [{
		        name: title,
		        type: 'pie',
		        radius: ['36px', '49px'],//圆环内外径大小，可固定像素可相对div百分比
	            center: ['50%', '30%'],//圆环圆心水平，竖直
		        label: {
		            normal: {
		                position: 'center'
		            }
		        },

		     data: [{
		            value: value1,
		            name: key1,
		            label: {
		                normal: {
		                    formatter: '{d} %',
		                    textStyle: {
		                        fontSize: 18
		                    }
		                }
		            }
		        }, {
		            value: value2,
		            name: key2,
		            label: {
		            	show:'false',
		                normal: {
		                    formatter: '',	
		                    textStyle: {
		                        fontSize: 15
		                    }
		                }
		            },
		            tooltip: {
		                show: false
		            },
		            itemStyle: {
		                normal: {
		                	
		                },
		                emphasis: {
		                }
		            },
		            hoverAnimation: false
		        }]
		    }],
	            color:['#00CCFF','#ccc']
		};
	myecahrt.setOption(option);
}
function loadLeft_2(){
	left_2=document.getElementById('left_2');
	left_2.innerHTML='<h4 align="center" style="color:#EBD775">中医馆信息化</h4>';
	//医院健康管理系统
	$.post('/tcmbdsp_c/Information/TCMSysWorkStation',{},function(data){
		var title='医院管理系统',
		key1='有医院管理系统',
		key2='无医院管理系统',
		value1=data.data.list2[0].value,
		value2=data.data.list2[1].value;
		tsws=document.createElement('div');//医院健康管理系统
		left_2.appendChild(tsws);
		tsws.setAttribute('id', 'tsws');
		tsws.setAttribute('style', 'height:50%;width:32%;float: left;display: inline;position:absolute;left:0%;top:37%');
		drawRing(tsws,title,key1,key2,value1,value2);
//		tsws.innerHTML='<p>医院管理系统</p>';
	});
	
	//医生工作站
	$.post('/tcmbdsp_c/Information/DocWorkStation',{},function(data){
		var title='医生工作站',
		key1='有医生工作站',
		key2='无医生工作站',
		value1=data.data.list2[0],
		value2=data.data.list2[1];
		dws=document.createElement('div');//医生工作站
		left_2.appendChild(dws);
		dws.setAttribute('id', 'dws');
		dws.setAttribute('style', 'height:50%;width:32%;float: left;display: inline;position:absolute;left:32%;top:37%');
		drawRing(dws,title,key1,key2,value1,value2);
//		dws.innerHTML='<p>医生工作站</p>';
	});
	
	// 中医特色医生业务系统
	$.post('/tcmbdsp_c/Information/TCMDocWorkStation',{},function(data){
		var title='中医特色业务系统',
			key1='有中医特色业务系统',
			key2='无中医特色业务系统',
			value1=data.data.list2[0].value,
			value2=data.data.list2[1].value;
		tdws=document.createElement('div');// 中医特色医生业务系统
		left_2.appendChild(tdws);
		tdws.setAttribute('id', 'tdws');
		tdws.setAttribute('style', 'height:50%;width:36%;float: left;display: inline;position:absolute;left:64%;top:37%');
//		tdws.innerHTML='<p>中医特色医生业务系统</p>';
		drawRing(tdws,title,key1,key2,value1,value2);
	});
}
//左三全国职业医生占比
function loadLeft_3(){
	left_3=document.getElementById('left_3');
	itn=document.createElement('div');
	left_3.innerHTML='<h4  align="center" style="color:#EBD775">中医馆信息化培训</h4>';
	itn.setAttribute('id','itn');
	itn.setAttribute('style', 'height:99%;position:relative;');
	left_3.appendChild(itn);
	head=document.createElement('div');
	head.setAttribute('id','head');
	head.setAttribute('style', 'width:15%;height:15%;position:absolute;left:42.4%;top:17%;');
	head.innerHTML='<img alt="" src="/tcmbdsp_c/resources/images/head.png" style="width:87%;height:183%;">';
	//后台请求数据
	$.post('/tcmbdsp_c/Information/InforTrained',{},function(data){
			trained=data.data[1][0];
			notrained=data.data[1][1];
//网上代码
			myecahrt_itn=echarts.init(itn);
			option_itn = {
				      backgroundColor: 'none',
				      title: {
				          text: '',
				          left: 'center',
				          top: 10,
				          textStyle: {
				              color: '#ccc'
				          }
				      },
				      tooltip : {
				          trigger: 'item',
				          formatter: "{a} <br/>{b} : {d}%"
				      },
				      color:['#4CC3CE'],
				      legend: {
					       // orient: 'vertical',  //图例摆放方式
					        left: 'center',
					        top:'70%',
					        data: [
					                    {
					                        name:'接受信息化培训',
					                        textStyle:{
					                            fontSize:12,
					                            fontWeight:'bolder',
					                            color:'#FFF'
					                        },
					                    },
					                    {
					                        name:'未接受信息化培训',
					                        textStyle:{
					                            fontSize:12,
					                            fontWeight:'bolder',
					                            color:'#FFF'
					                        },
					                    }
					                ],
				     
					    },
				      series : [
				          {
				              name:'接受信息化培训',
				              type:'pie',
				              clockwise:'true',//是否顺时针旋转
				              startAngle:'-140',//起始的倾斜角度
				              radius : ['40%','70'],//半径
				              center: ['50%', '30%'],//水平，竖直
				              data:[
				                  {
				                      value:notrained,
				                      name:'未接受信息化培训',
				                      itemStyle:{
				                          normal:{
				                              color:'rgb(240,240,240)'
				                          }
				                      }
				                  }	,
				                  {
									    value:trained,
									    name:'接受信息化培训',
									    itemStyle:{
									        normal:{
									            color:'rgb(77,211,223)'
									        }
									    }
									}
				              ],
				          }
				      ],
				      color:['#00CCFF']
				  };				                    
			myecahrt_itn.setOption(option_itn);
			itn.appendChild(head);
		})

}

function drawBar(div,tit,pNames,Nums,title){
	myechart_div=echarts.init(div);
	option_div = {
		    title : {
		        text:title ,
		        textStyle:{
		        	color:'#EBD775',
		        	fontSize:20
		        },
		        right:'10%'

		    },
		    grid : {
		    	x : '0',
		    	y : '0',
		    	x2 :'0',
		    	y2 :'20%',
		    },
		    
		    tooltip : {
		        trigger: 'axis'
		    },
		    legend: {
		      show:false,
		        data:[]
		    },
		    calculable : true,
		    xAxis : [
		        {
		            type : 'category',
		            data : pNames,			            
		            axisLabel: {
						rotate:0,
			            textStyle: {
			                color: '#EEE',
			                fontSize:10
			            },
			            'interval':0,
			        }
		        }
		    ],
		    yAxis : [
		        {
		          axisLine:{show:false},
		            type : 'value',
		            splitLine:{
		            	lineStyle:{
			            	color:'#284190'
		            	}
		            	//show:false
		            }
		        },
		        
		    ],
		    series : [
		        {
		            name:tit,
		            type:'bar',
		            data:Nums,
		            itemStyle:{
		            	normal:{
			            	color:'#0cf'
		            	}
		            },
		            lable:{
		            	emphasis:{
		            		show:'false'
		            	}
		            }
		        },
		        
		    ]
		};
	option_div.xAxis[0].axisLabel.formatter = function(item){
		return item.split("").join("\n");
	};
	myechart_div.setOption(option_div);   
}
function loadRight_2(){

	right_2=document.getElementById('right_2');
	right_2.innerHTML='<h4 align="center" style="color:#EBD775">各省国家安排专项经费支持建设的中医馆</h4>';
	tcm=document.createElement('div');
	tcm.setAttribute('id', 'tcm');
	tcm.setAttribute('style', 'height:90%');
	right_2.appendChild(tcm);
	var tcmNum='';
	$.post('/tcmbdsp_c/baseData/centreHospitalCount',{},function(data){
		tcmNum=data.data.list2[0];
	})
	$.post('/tcmbdsp_c/RankingOfResourceDataController/getProvinceQuotaListBycTcmNmuDesc',{},function(data){
		pNames=data.data.list1;
		tNums=data.data.list2;
		drawBar(tcm,'中医馆',pNames,tNums,tcmNum);
	})
}
function loadRight_3(){
	right_3=document.getElementById('right_3');
	right_3.innerHTML='<h4  align="center" style="color:#EBD775">执业医师</h4>';
	docn=document.createElement('div');
	docn.setAttribute('id', 'docn');
	docn.setAttribute('style', 'height:90%');
	right_3.appendChild(docn);
	var docNum='';
	$.post('/tcmbdsp_c/baseData/doctorNum',{year:'2017'},function(data){
		docNum=data.data.int1.toString();
	})
	$.post('/tcmbdsp_c/RankingOfResourceDataController/getProvinceQuotaListByDoctorNmuDesc',{},function(data){
		myechart_doc=echarts.init(docn);
		pNames=data.data.list1;
		dNums=data.data.list2;
		drawBar(docn,'医生数',pNames,dNums,docNum);
	})
}

function loadCenter_2(){
	center_2=document.getElementById('center_2');
	
	var processOption5 = {
			chartId:'center_2',
			url:'/tcmbdsp_c/resources/json/china.json',
			name:'china',
		};
	renderMap(processOption5);
	function renderMap(option){
		var url = option.url,name = option.name,
			chartId = option.chartId;
		$.ajax({
			url: url,
			type: "GET",
			async:false,
			dataType: "json",
			success: function (mapData) {
				var myChart = echarts.init(document.getElementById(chartId));
		        echarts.registerMap(name, mapData);
		        var defaultOption = {
		        	tooltip : {
	 	            	  formatter:function(item){
	 	            		var itemData = item.data;
	 	     				return null;
	 	     			}
	 	           },
	 	           visualMap: {
	 	        		max:846, 
	 		            show:true,
	 		            realtime: false,
	 		            calculable: true,
	 		            inRange: {
	 		            	color: ['#66ccff','#6699ff','#6666ff','#6633ff','#6600ff'],
	 		            	//symbolSize:['10px','110px'],
	 		            	//colorLightness:'10%',
	 		            	//colorSaturation:'10%',
	 		            },
	 		            left:'17%',
	 		            align:'left',
	 		            bottom:'0%',
	 		            textStyle:{
	 		                color:'#fff',
	 		                fontSize:15
	 		            }
	 		        },
	 		        series: [{
	                      name: '中医馆数量',
	                      type: 'map',
	                      mapType: name, // 自定义扩展图表类型
	                      zoom:1.12,
	                      roam:false,
	                      selectedMode:'single',
	                      itemStyle:{
	                     	 normal:{
	 						       areaStyle:{
	 						       		color: '#1b1b1b'
	 						       },
	 						       areaColor: 'rgba(22,49,76,0.3)'
	 						   },
	 							emphasis:{
	 								label:{ 
	 									show:true
	 								},
	 								areaColor:'#FEE624',
	 								borderWidth:4,
	 								borderColor:'rgba(194,53,49,0.3)',
	 								shadowBlur:5,
	 								shadowOffsetX:5,
	 								shadowOffsetY:5,
	 								shadowColor: 'rgba(255, 0, 0, 0.5)'
	 							}
	 	                   },
	 	                   label:{
	 	                	   normal:{
	 	                		   show:true,
	 	                		   textStyle:{
	 	                			   fontSize:16
	 	                		   }
	 	                	   },
	 	                	   emphasis:{
	 	                		   show:true,
	 	                		   textStyle:{
	 	                			   fontSize:16,
	 	                			   color:'#000'
	 	                		   }
	 	                	   },
	 	                	   data:[]
	 	                   }
	                 }],
		        }; 
		        
		     // 使用刚指定的配置项和数据显示图表。
		        	myChart.setOption(defaultOption);
				    $.post('/tcmbdsp_c/RankingOfResourceDataController/getProvinceQuotaListBycTcmNmuDesc',function(data){
				    	var processChart5 = echarts.getInstanceByDom(document.getElementById('center_2'));
				    	var mapOption = processChart5.getOption();
				    	data1 = data.data.list1;
				    	data2 = data.data.list2;
				    	for (var i = 0; i < 31; i++) {
				    			mapOption.series[0].data.push({
				    				name:data1[i],
				    				value:data2[i],
				    			});
				    	}
				    	mapOption.tooltip[0].formatter = function(params){
				    		return params.name + '中医馆数量' + ' : ' + params.value;
				    	};
				    	
				    	processChart5.setOption(mapOption);
				    });
				    myChart.on('click', function (params) {
				    	reloadMap(params,option);
				    });
			}
		});
	}
	function reloadMap(params,option){		//重新加载地图
		var mapChart = echarts.getInstanceByDom(document.getElementById(option.chartId)),
				mapOption = mapChart.getOption(),
				name = params.name,
				pname = _pinUtil(name);
		if(!pname){return;}
		if(pname=="yunnan"){  
			window.open('http://10.10.200.163:7053/tcmbdsp_53/','_blank');
			//window.open('http://10.10.200.152:8087/tcmbdsp/','_blank');
			return;
		}else if(pname == "hubei") {
			window.open('http://10.10.200.163:7042/tcmbdsp_42/','_blank');
			//window.open('http://localhost:8066/tcmbdsp_42/','_blank');
			return;
		}else if(pname == "shanxi") {
			window.open('http://10.10.200.163:7061/tcmbdsp_61/','_blank');
			return;
		}else if(pname == "hebei") {
			window.open('http://10.10.200.163:7013/tcmbdsp_13/','_blank');
			//window.open('http://localhost:8066/tcmbdsp_13/','_blank');
			return;
		}else if(pname == "zhejiang") {
			window.open('http://10.10.200.163:7033/tcmbdsp_33/','_blank');
			//window.open('http://localhost:8066/tcmbdsp_33/','_blank');
			return;
		}else if(pname == "sichuan") {
			window.open('http://10.10.200.163:7051/tcmbdsp_51/','_blank');
			//window.open('http://localhost:8066/tcmbdsp_51/','_blank');
			return;
		}
			var	url = option.url.substring(0,15)+pname+".json";
		$.getJSON(url, function (mapData) {
	        echarts.registerMap(pname, mapData);
	        mapOption.series[0].map = pname;
	        mapOption.series[0].mapType = pname;
	        mapChart.setOption(mapOption);
		});
		//$('.dropmenu').find('.li-focus').removeClass('li-focus');
		//$('.dropmenu a:first').trigger('click','111');	//重新请求加载数据
	}

	function _pinUtil(name){		//拼音码转换
		var _data = {'北京':'beijing','天津':'tianjin','河北':'hebei','山西':'shanxi','内蒙古':'neimenggu',
						'辽宁':'liaoling','吉林':'jilin','黑龙江':'heilongjiang','上海':'shanghai','江苏':'jiangsu',
						'浙江':'zhejiang','安徽':'anhui','福建':'fujian','江西':'jiangxi','山东':'shandong',
						'河南':'henan','湖北':'hubei','湖南':'hunan','广东':'guangdong','广西':'guangxi',
						'海南':'hainan','重庆':'chongqing','四川':'sichuan','贵州':'guizhou','云南':'yunnan',
						'西藏':'xizang','陕西':'shanxi','甘肃':'gansu','青海':'qinghai','宁夏':'ningxia',
						'新疆':'xinjiang','中国':'china'};
		return _data[name];
	}

};

function loadRight_1(){
	right_1=document.getElementById('right_1');
	right_1.innerHTML='<h4 align="center" style="color:#EBD775">国家安排专项经费支持建设的中医馆年度变化</h4>';
	tyc=document.createElement('div');
	tyc.setAttribute('id', 'tyc');
	tyc.setAttribute('style', 'position:relative;height:100%;top:-10%');
	right_1.appendChild(tyc);
	$.post('/tcmbdsp_c/baseData/centreHospitalCount',{},function(data){
		tcmNum=data.data.list2[0].toString();
	
//	$.post('',{},function(){
		tyc_echart=echarts.init(tyc);
		option_tyc = {
			    title : {
			        text: tcmNum,
			    	  left:'75%',
			    	  top:'0%',
			    	  textStyle:{
			    		  color:'#EBD775',
			    		  fontSize:20
			    	  }
			    },
			    grid:{
			    	x : '10%',
			    	y : '5%',
			    	x2 :'10%',
			    	y2 :'20%',
			    },
			    tooltip : {
			        trigger: 'axis'
			    },
			    calculable : true,
			    xAxis : [
			        {
			            type : 'category',
			            boundaryGap : false,
			            data : ['2015','2016','2017'],
			        	axisLabel: {
						rotate:0,
			            textStyle: {
			                color: '#EEE',
			                fontSize:10
			            }
//			            'interval':0,
			        }
			        }
			    ],
			    yAxis : [
			        {
			            type : 'value',
			            axisLabel: {
							rotate:0,
				            textStyle: {
				                color: '#EEE',
				                fontSize:10
				            }
//				            'interval':0,
				        },
				        splitLine:{
			            	lineStyle:{
				            	color:'#284190'
			            	}
			            	//show:false
			            }
			        }
			    ],
			    series : [
			        {
			            name:'该年度',
			            type:'line',
			            smooth:true,
			            itemStyle: {
			            	normal: {
			            		areaStyle: {type: 'default'},
			            		color:'#0CF'
			            	}
			        },
			            data:[12231,17021,17021],
			        }
			    ]
			};
		tyc_echart.setOption(option_tyc);
	})
//	})

		                    
}
function loadCenter_1(){
	mid_1=document.getElementById('center_1');
	mid_1.innerHTML='<div style="position:absolute;top:7%;left:10%">'
		+'<p style="font-size:30px;color:#fff">中医馆</p><p></p>'+'</div>';
	var date= new Date();
	var year=date.getFullYear(); 
	var divTcmNum=document.createElement('div');
	sg=document.createElement('div');
	sg.innerHTML='<p style="font-size:30px">个</p>';
	sg.setAttribute('class','tcmNum')
	divTcmNum.appendChild(sg);
	divTcmNum.setAttribute('style','width:350px;height：115px;position:absolute;top:13%;left:5%;float:left;');
	$.post('/tcmbdsp_c/baseData/centreHospitalCount',{year:year.toString()},function(data){
		var tcmNum=data.data.list2[0];
		tcmNum=tcmNum.toString();
		//console.log(tcmNum);//complete
		var tcmN='';//获取下标字符
		var ddivs='';//获取动态的HTML语句
		var ddiv='';//动态的HTML语句
		for(var i=tcmNum.length-1;i>=0;i--){
			tcmN=tcmNum.charAt(i);//获取下标字符
			if((tcmNum.length-1-i)%3==0&&(tcmNum.length-1)!=i){
				ddiv='<div style="float:right;width:30px;height:95px;margin-right: 10px;"><p class="tcma">，</p></div>';
				ddivs+=ddiv;
			}
			ddiv='<div class="tcmNum" ><p class="tcma">'+tcmN+'</p></div>';
			ddivs+=ddiv;
		}
		divTcmNum.innerHTML=ddivs;
		mid_1.appendChild(divTcmNum);
	});
	$.post('/tcmbdsp_c/baseData/doctorNum',{year:year.toString()},function(data){
		var docNum=data.data.int1.toString();
		var docN='';
		var ddivs='<div style="float:left"><br/><big font-size="40%"><b>全国执业医生数：</b></big></div>';//获取动态的HTML语句
		var ddiv='';//动态的HTML语句
		console.log(docNum);
		for(var j=0;j<docNum.length;j++){
			if((docNum.length-j)%3==0 && j>0){
				ddiv='<div style="float:left;width:5px;height:50px;margin-right: 20px;"><p class="doca">，</p></div>';
				ddivs+=ddiv;
			}
			docN=docNum.charAt(j);
			ddiv='<div class="docNum" ><p class="doca">'+docN+'</p></div>';
			ddivs+=ddiv;
		}
		var divDocNum=document.createElement('div');
		divDocNum.setAttribute('style','width:50%;height:115px;position:absolute;top:15%;left:50%;');
		divDocNum.innerHTML=ddivs;
		mid_1.appendChild(divDocNum);
	})
	
}
